import request from '@/utils/request'

// 查询告警列表

export function listxbWarn(query) {
  return request({
    url: '/alarmmanagement/warn/listXb',
    method: 'get',
    params: query
  })
}

export function listDbWarn(query) {
  return request({
    url: '/alarmmanagement/warn/listDb',
    method: 'get',
    params: query
  })
}

// 查询告警详细
export function getWarn(ID) {
  return request({
    url: '/alarmmanagement/warn/' + ID,
    method: 'get'
  })
}

// 新增告警
export function addWarn(data) {
  return request({
    url: '/alarmmanagement/warn',
    method: 'post',
    data: data
  })
}

// 修改告警
export function updateWarn(data) {
  return request({
    url: '/alarmmanagement/warn',
    method: 'put',
    data: data
  })
}

// 删除告警
export function delWarn(ID) {
  return request({
    url: '/alarmmanagement/warn/' + ID,
    method: 'delete'
  })
}
